﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Globalization;
using System.Web.Mvc;
using System.Web.Security;

namespace JuniorProject.Models
{
    public class ScreeningQuestionContext : DbContext
    {
        public ScreeningQuestionContext()
            : base("DefaultConnection")
        {
        }
    }

    public class ScreeningQuestionModel
    {
        public ScreeningQuestionModel(int ID, string Question, List<AnswerModel> Answers)
        {
            this.ID = ID;
            this.Question = Question;
            this.Answers = Answers;
        }
        
        public ScreeningQuestionModel()
        {
        }

        [Display(Name = "QuestionID")]
        public int ID { get; set; }

        [DataType(DataType.Text)]
        [Display(Name = "Question")]
        public string Question { get; set; }

        public string SelectedAnswer { get; set; }

        public List<AnswerModel> Answers { get; set; }
    }

    public class QuestionListModel
    {
        public QuestionListModel()
        {
            this.Questions = new List<ScreeningQuestionModel>();
        }

        public QuestionListModel(QuestionListModel model)
        {
            this.Questions = new List<ScreeningQuestionModel>(model.Questions);
        }

        [Display(Name = "Question List")]
        public List<ScreeningQuestionModel> Questions { get; set; }

        [Display(Name = "List Iterator")]
        public int ListIterator { get; set; }

    }

    public class AnswerModel
    {
        public AnswerModel(int ID, string Answer)
        {
            this.ID = ID;
            this.Answer = Answer;
        }

        public AnswerModel()
        {
        }

        [Display(Name = "AnswerID")]
        public int ID { get; set; }

        [DataType(DataType.Text)]
        [Display(Name = "Answer")]
        public string Answer { get; set; }
    }
}
